#!/usr/bin/env python
import os
import sys
import shutil

"""
path_now = os.getcwd()
path_iter = os.walk(path_now)



for i in path_iter:
    if '__pycache__' in i[1]:
        shutil.rmtree('{}\\__pycache__'.format(i[0]))
print('OK')
"""       


path = '.'

path_iter = os.walk(path)
for a, b, c in path_iter:
    files = os.path.basename(a)
    if files == '__pycache__' or files == '.idea':
        print('删除了{}'.format(a))
        shutil.rmtree(a)
print('OK')










        
